<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <link rel="stylesheet" href="./guide/swiper/dist/css/swiper.min.css"/>
    <script type="text/javascript" src="./guide/swiper/dist/js/swiper.min.js"></script>
    <style type="text/css">
        html, body {
            width: 100%;
            height: 100%;
            border: 0;
            margin: 0;
            padding: 0;
            background-color: #ffffff;
        }

        .guide_image {
            width: 100%;
        }
    </style>
</head>
<body>
<!-- Slider main container -->
<div class="swiper-container" style="height:100%;">
    <!-- Additional required wrapper -->
    <div class="swiper-wrapper">
        <!-- Slides -->
        <div class="swiper-slide" style="text-align:center">
            <img class="guide_image" src="./guide/img/1.jpg"/>
        </div>
        <div class="swiper-slide" style="text-align:center">
            <img class="guide_image" src="./guide/img/2.jpg"/>
        </div>
        <div class="swiper-slide" style="text-align:center">
            <img class="guide_image" id="try" src="./guide/img/3.jpg"/>
        </div>
    </div>
    <div class="swiper-pagination"></div>
</div>
<script src="js/jquery.2.1.1min.js"></script>
<script>
    width_screen=screen.width;        //   获取宽度
    height_screen=screen.height;        //高度
    var bili=screen.width/828
    var img_height=bili*1472;
    $('.guide_image').css('margin-top',parseInt(height_screen-img_height)/2-10+"px")
    
    

    var mySwiper = new Swiper('.swiper-container', {
        loop: false,
        pagination: '.swiper-pagination'
    })
    function closeGuidePage() {
        localStorage.setItem('showGuidePage', '1');
        var partenW = window.parent;
        var parentDiv = partenW.document.getElementById('cordovaContent');                    //父窗口中定义的div
        var parentModel = partenW.justep.Bind.contextFor(parentDiv).$model;          
        parentModel.closeGuidePage();  //父窗口model中定义的函数
    }

    document.getElementById('try').addEventListener('click', function () {
        closeGuidePage();
    }, false);


    mySwiper.on('reachEnd', function (event) {
        if (event.activeIndex == 2) {
            closeGuidePage();
        }
    });
</script>


</body>
</html>
